<?php 
define('ROOT_PATH', str_replace('sysop/index.php', '', str_replace('\\', '/', __FILE__)));
include(ROOT_PATH."config.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><?php echo $sitename; ?> - Sysop: Main Menu</title>
<meta name="description" content="<?php echo $sitename; ?> - Sysop: Main Menu">
<meta name="keywords" content="free to try, software, shareware, freeware, developers, vendors, download, PAD">
<meta name="author" content="Andrey Aleksanyants, M.D.">
<meta name="copyright" content="easy HTools">
<meta http-equiv="imagetoolbar" content="no">
<link rel="stylesheet" type="text/css" href="../<?php echo $cssfile; ?>">
<link rel="shortcut icon" href="../favicon.ico">
</head>
<body>
<table class="tmain" align="center" width="90%" cellspacing="0" cellpadding="0">
<tr>
<td class="tmain">
<table class="tlogo" align="center" width="100%" cellspacing="0" cellpadding="4">
<tr>
<td align="right">
<p>Home</a></p>
</td>
</tr>
</table>
</td>
</tr><tr>
<td class="tmain">
<br>
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="1">
<tr valign="top">
<td class="tbody">
<h1><?php echo $sitename; ?> - Sysop: Main Menu</h1>
<?php

// Connecting to database
if(!($link_id = mysql_connect($dbhost, $userid, $userpassword))) {
	die ("<p><b>Error connecting to the database server:</b> " . mysql_error() . ". If you did not create the database before then please refer to the following link:</p>\n<p><b><a href=\"dbcreate.php\">Database and tables creation page</a></b></p><br>\n");
}
mysql_select_db($dbname) or die ("<p><b>Error selecting database:</b> " . mysql_error() . ". If you did not create the database before then please refer to the following link:</p>\n<p><b><a href=\"dbcreate.php\">Database and tables creation page</a></b></p><br>\n");

$numrows = 0;
$result = mysql_query("SELECT * FROM paddata", $link_id);
if($result) $numrows = mysql_num_rows($result);
echo "<p>There are <b>" . $numrows . "</b> PADs listed in your database.</p><br>\n";

// Disconnect from database
mysql_close($link_id);
?>
<table class="tvisible" width="100%" cellSpacing="0" cellPadding="4">
<tr>
<td><a class="catmajor" href="dbcreate.php">Create database</a></td>
</tr><tr>
<td><a class="catmajor" href="backupdb.php">Backup Paddata table</a></td>
</tr><tr>
<td><a class="catmajor" href="addpadlist.php">Submit PAD list</a></td>
</tr><tr>
<td><a class="catmajor" href="backuppadlist.php">Backup PAD list</a></td>
</tr><tr>
<td><a class="catmajor" href="padpoll.php">Poll PADs</a></td>
</tr><tr>
<td><a class="catmajor" href="dupecheck.php">Find duplicate PAD files</a></td>
</tr><tr>
<td><a class="catmajor" href="query.php">Query / Delete</a></td>
</tr><tr>
<td><a class="catmajor" href="submmanage.php">Manage new submissions</a></td>
</tr><tr>
<td><a class="catmajor" href="siterate.php">Rate software</a></td>
</tr><tr>
<td><a class="catmajor" href="devcontact.php">Contact developers</a></td>
</tr><tr>
<td><a class="catmajor" href="usrmanage.php">Manage users reviews</a></td>
</tr><tr>
</tr><tr>
<td><a class="catmajor" href="help.php">Manage/Remove Help</a></td>
</tr><tr>
</tr><tr>
<td><a class="catmajor" href="feature.php">Manage/Remove Feature</a></td>
</tr><tr>
<td><a class="catmajor" href="aflmanage.php">Manage affiliate data</a></td>
</tr><tr>
<td><a class="catmajor" href="aflmodify.php">Add/Modify affiliate data</a></td>
</tr><tr>
<td><a class="catmajor" href="aflremove.php">Remove affiliate data</a></td>
</tr><tr>
<td><a class="catmajor" href="custommanage.php">Manage/Remove custom download URLs</a></td>
</tr><tr>
<td><a class="catmajor" href="customadd.php">Add/Modify custom download URLs</a></td>
</tr>
</table>
<br>
<br>

</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>